import { ref } from "vue";
import service from "../index.js";

const medicalApi = {
    //查询所有的项目
    selectAll(pageNum, key, input){
        const params = {
            pageNum: pageNum,
            [key]: input
          };
        //   console.log(params)
        return service.get('/admin/medical', {params});
    },
    selebymid(mid){
        return service.get(`/admin/medical/${mid}`)
    },
    insertMedical(medical){
        return service.post('/admin/medical',medical)
    },
    updateMedical(medical){
        return service.put('/admin/medical',medical)
    },
    delMedical(mid){
        return service.delete(`/admin/medical/${mid}`)
    },
    selectBymidEmp(){
        return service.get('/emp/medical')
    },
    updateByMedical(medicalStaff){
        return service.put('/emp/medical',medicalStaff)
    }
    
}
export default medicalApi;